<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>用户列表</title>
    
	<link rel="stylesheet" type="text/css" href="css/commonStyle.css">
	
	<script type="text/javascript" src="js/JQuery.js" ></script>
	<script type="text/javascript" src="lhgdialog/lhgdialog.min.js" ></script>
	<script type="text/javascript" src="dwr/engine.js" ></script>
	<script type="text/javascript" src="dwr/util.js" ></script>
	<script type="text/javascript" src="dwr/interface/userAjax.js" ></script>
	<script type="text/javascript" src="js/userList.js" ></script>

  </head>
  
  <body>
  	<center>
    <table class="fullTableStyle">
    	<thead>
    		<tr class="theadNoTitle">
    			<td colspan="9">
    				<span>用户列表显示</span>
    				<a href="#" onclick="return showAddInputDialog()" >&cong;添加用户</a>
    			</td>
    		</tr>
	    	<tr>
	    		<td><input type="checkbox" onclick="checkAllUsers(this)" /></td>
	    		<td>用户编号</td>
	    		<td>用户名称</td>
	    		<td>手机</td>
	    		<td>邮箱</td>
	    		<td>直属上级</td>
	    		<td>角色</td>
	    		<td>修改</td>
	    		<td>删除</td>
	    	</tr>
    	</thead>
    	<tbody>
    		<s:iterator value="users" var="user">
	    		<tr>
	    			<td><input type="checkbox" name="userIds" value="<s:property value='#user.id' />" /></td>
	    			<td><s:property value="#user.id" /></td>
	    			<td><s:property value="#user.name" /></td>
	    			<td><s:property value="#user.cellphone" /></td>
	    			<td><s:property value="#user.email" /></td>
	    			<td><s:property value="#user.leader.name" /></td>
	    			<td><s:property value="#user.roleInfo.name" /></td>
	    			<td><input type="button" style="background: url('img/edit.png');" class="littleLogo" onclick="showUpdateInputDialog(${ user.id })" /></td>
	    			<td><input type="button" style="background: url('img/del.png');" class="littleLogo" onclick="delUser(${ user.id })"></td>
	    		</tr>
    		</s:iterator>
    	</tbody>
    	<tfoot>
    		<tr>
    			<td colspan="9">
    				<ul>
    					<!-- 页面记录数控制 -->
    					<li>
    						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;条/页
	    					<span class="countEveryPage">
				    			<a href="User_list.action?pageSize=10">10</a>
	    					</span>
		    				<span class="countEveryPage">
			    				<a href="User_list.action?pageSize=15">15</a>
		    				</span>
    					</li>
    					<!-- 页面记录数控制 -->
    					
    					<!-- 分页超链接 -->
		    			<li>
		    				<a href="User_list.action?pageNumber=${ page.pageCount }" >尾页</a>
		    			</li>
		    			<s:if test="page.hasNext">
			    			<li>
			    				<a href="User_list.action?pageNumber=${ page.pageNumber + 1 }" >下一页</a>
			    			</li>
		    			</s:if>
		    			<s:if test="page.hasPre">
			    			<li>
			    				<a href="User_list.action?pageNumber=${ page.pageNumber - 1 }" >上一页</a>
			    			</li>
		    			</s:if>
		    			<li>
		    				<a href="User_list.action?pageNumber=1" >首页</a>
		    			</li>
		    			<!-- 分页超链接 -->
		    			
		    			<!-- 页面信息显示 -->
		    			<li class="tfootContStyle"><input type="button" value="批量删除" onclick="return delSelectedUsers()" /></li>
    					<li class="tfootContStyle"><span>共&nbsp;<s:property value="page.pageCount" />&nbsp;页,&nbsp;<s:property value="page.recordCount" />&nbsp;条记录,这是第&nbsp;<s:property value="page.pageNumber" />&nbsp;页</span></li>
		    			<li class="tfootContStyle"><span>此页显示第&nbsp;<s:property value="page.beginIndex + 1" />&nbsp;条到第&nbsp;<s:property value="page.endIndex" />&nbsp;条记录</span></li>
		    			<!-- 页面信息显示 -->
		    		</ul>
    			</td>
    		</tr>
    	</tfoot>
    </table>
    </center>
  </body>
</html>
